#include <iostream>

#include "Hash.h"

namespace MyHash {
template <class K, class Hash = HashFunc<K>>
class unordered_set {
 public:
  struct setKeyOfT {
    const K& operator()(const K& key) { return key; }
  };
  typedef typename MyHash::HashTable<K, K, setKeyOfT, Hash>::iterator iterator;
  typedef typename MyHash::HashTable<K, K, setKeyOfT, Hash>::iterator
      const_iterator;

  iterator begin() { return _Ht.begin(); }
  iterator end() { return _Ht.end(); }
  const_iterator begin() const { return _Ht.begin(); }
  const_iterator end() const { return _Ht.end(); }

  std::pair<iterator, bool> insert(const K& key) { return _Ht.Insert(key); }

  iterator find(const K& key) { return _Ht.Find(key); }

  bool erase(const K& key) { return _Ht.Erase(key); }

 protected:
 private:
  HashTable<K, K, setKeyOfT, Hash> _Ht;
};
}  // namespace MyHash